package main

import (
	"MerelybG/Spider/ZuidaZY"
	"fmt"
)

func down(schedule float64) {
	fmt.Println(schedule)
}

func main() {
	//detect.FaceDetect()
	ZuidaZY.DownloadVideo("F:\\Download")
	//ZuidaZY.DownloadVideo("D:\\Download\\欧美电视剧")
	//Download.HttpDownload("http://ok.renzuida.com/1911/丹程[纪录片]-01.mp4", "D:\\Download\\go\\01.mp4", false, down)
	//Download.ParseTorrent("D:\\123.torrent")
	//fmt.Print(gocv.Version())
	//spider.SpiderVideo("铁齿铜牙纪晓岚");
	//fmt.Println(EightCharactersOfDate("2018-10-12 14:55:22"))
	//var ss string = Encrypt("liming5258", "2018-10-12 14:55:22")
	//fmt.Println("11111")
	//fmt.Println(Decrypt(ss, "2018-10-12 14:55:22"))
	//gocv.Version()
	//fmt.Println(gocv.Version());
	// set to use a video capture device 0
	//deviceID := 0
	//
	//// open webcam
	//webcam, err := gocv.OpenVideoCapture(deviceID)
	//if err != nil {
	//	fmt.Println(err)
	//	return
	//}
	//defer webcam.Close()
	//
	//// open display window
	//window := gocv.NewWindow("Face Detect")
	//defer window.Close()
	//
	//// prepare image matrix
	//img := gocv.NewMat()
	//defer img.Close()
	//
	//// color for the rect when faces detected
	//blue := color.RGBA{0, 0, 255, 0}
	//
	//// load classifier to recognize faces
	//classifier := gocv.NewCascadeClassifier()
	//defer classifier.Close()
	//
	//if !classifier.Load("D:/SoftWare/OpenCV400/build/install/etc/haarcascades/haarcascade_frontalface_default.xml") {
	//	fmt.Println("Error reading cascade file: data/haarcascade_frontalface_default.xml")
	//	return
	//}
	//
	//fmt.Printf("start reading camera device: %v\n", deviceID)
	//for {
	//	if ok := webcam.Read(&img); !ok {
	//		fmt.Printf("cannot read device %v\n", deviceID)
	//		return
	//	}
	//	if img.Empty() {
	//		continue
	//	}
	//
	//	// detect faces
	//	rects := classifier.DetectMultiScale(img)
	//	fmt.Printf("found %d faces\n", len(rects))
	//
	//	// draw a rectangle around each face on the original image
	//	for _, r := range rects {
	//		gocv.Rectangle(&img, r, blue, 3)
	//	}
	//
	//	// show the image in the window, and wait 1 millisecond
	//	window.IMShow(img)
	//	window.WaitKey(1)
	//}
}
